<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="u" uri="/iuie-tag"%>
<%@ taglib prefix="sys" uri="/sys-tag" %>
<%@ taglib prefix="lui" tagdir="/WEB-INF/tags" %>

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>码表管理</title>
</head>
<lui:context/>
<u:View basePath="/res-system/code" userJS="code" delayLoadJs="false">
<body>
<lui:boards>
    <lui:board width="50%" boardTitle="码值类型">
        <form id="findCodeTypeFrm" class='m-cust'>
	        <div class="form-horizontal">
	            <div class="form-group">
	                <div class="col-md-4 col-sm-4">
	                    <div class="input-group"> 
	                        <label for="state" class="input-group-addon">状态</label>
	                        <select name="state" id="state" class="form-control">
	                            <option value="">请选择</option>
	                            <option value='1'>正常</option>
	                            <option value='0'>禁用</option>
	                        </select>
	                    </div>
	                </div>
	                <div class="col-md-5 col-sm-5">
	                    <div class="input-group"> 
	                        <label for="codeTypeName" class="input-group-addon">名称</label>
	                        <input name="codeTypeName" id="codeTypeName" type="text" class="form-control">
	                    </div>
	                </div>
	            </div>
	        </div>
	        <div class="form-horizontal">
	            <div class="form-group">
	                <div class="col-md-12 col-sm-12">
	                    <div class="btn-group" id="buttonGro">
	                        <button type="button" class="btn btn-primary" onclick="SysCodePage.queryCodeTypeByCondition()"><i class='fa fa-fw fa-search'></i>查询</button>
	                        <button type="reset" class="btn btn-default"><i class='fa fa-fw fa-repeat'></i>重置</button>
	                        <button type="button" class="btn btn-info" onclick="SysCodePage.openCodeTypeAddDialog()"><i class='fa fa-fw fa-plus'></i>新增</button>
	                    </div>
	                </div>
	            </div>
	        </div>
            <u:dropList id="drop_state">
                <u:dropItem value="0" text="禁用" className="m-color-dark-red"/>
                <u:dropItem value="1" text="正常" className="m-color-dark-green"/>
            </u:dropList>
            <u:dropListView id="dropView_codeTypeOper">
                <u:dropView name="updateCodeType" template="edit" onClick="SysCodePage.updateCodeType" title="修改码值类型"/>
                <u:dropView name="removeCodeType" template="delete" onClick="SysCodePage.removeCodeType" title="删除码值类型"/>
            </u:dropListView>
            <u:dataSet id="codeTypeSet" idField="userId">
                <u:dataField name="codeTypeId" display="ID"/>
                <u:dataField display="名称" name="codeTypeName" width="180px" align="left"/>
                <u:dataField display="状态" name="state" dropdown="drop_state"/>
                <u:dataField name="oper" display="操作" dropView="dropView_codeTypeOper"/>
            </u:dataSet>
            <!-- 获取码值类型列表ajax -->
            <lui:ajax id="findCodeTypeAjax" url="${ctx }/sys/code/findCodeTypeByPage" formQuery="#findCodeTypeFrm" onSuccess="SysCodePage.onQueryCodeTypeSucc"/>
            <lui:ajax id="removeCodeTypeAjax" url="${ctx }/sys/code/removeCodeTypeById" type="post" onSuccess="SysCodePage.onRemoveCodeTypeSucc"/>
            <lui:datatable id="codeTypeDatatable" ajax="findCodeTypeAjax" pagination="codeTypePagination" dataset="codeTypeSet" checkable="true"
                multiple="false" onItemClick="SysCodePage.onCodeTypeItemClick" cutLine="true" />
            <lui:pagination datatable="codeTypeDatatable" id="codeTypePagination" pageSize="15" pageChoice="15" showPageChoice="false"/>
        </form>
    </lui:board>
    <lui:board width="50%" boardTitle="码值">
        <form id="findCodeInfoFrm" class='m-cust'>
            <input hidden="hidden" name="typeId">
            <div class="form-horizontal">
                <div class="form-group">
                    <div class="col-md-4 col-sm-4">
                        <div class="input-group"> 
                            <label for="state" class="input-group-addon">状态</label>
                            <select name="state" id="state" class="form-control">
                                <option value="">请选择</option>
                                <option value='1'>正常</option>
                                <option value='0'>禁用</option>
                            </select>
                        </div>
                    </div>
                    <div class="col-md-4 col-sm-4">
                        <div class="input-group"> 
                            <label for="codeInfoValue" class="input-group-addon">编码</label>
                            <input name="codeInfoValue" id="codeInfoValue" type="text" class="form-control">
                        </div>
                    </div>
                    <div class="col-md-4 col-sm-4">
                        <div class="input-group"> 
                            <label for="codeInfoName" class="input-group-addon">名称</label>
                            <input name="codeInfoName" id="codeInfoName" type="text" class="form-control">
                        </div>
                    </div>
                </div>
            </div>
            <div class="form-horizontal">
                <div class="form-group">
                    <div class="col-md-12 col-sm-12">
                        <div class="btn-group" id="buttonGro">
                            <button type="button" class="btn btn-primary" onclick="SysCodePage.queryCodeInfoByCondition()"><i class='fa fa-fw fa-search'></i>查询</button>
                            <button type="reset" class="btn btn-default"><i class='fa fa-fw fa-repeat'></i>重置</button>
                            <button type="button" class="btn btn-info" onclick="SysCodePage.openCodeInfoAddDialog()"><i class='fa fa-fw fa-plus'></i>新增</button>
                        </div>
                    </div>
                </div>
            </div>
            <u:dropList id="drop_codeInfoState">
                <u:dropItem value="0" text="禁用" className="m-color-dark-red"/>
                <u:dropItem value="1" text="正常" className="m-color-dark-green"/>
            </u:dropList>
            <u:dropListView id="dropView_codeInfoOper">
                <u:dropView name="updateCodeInfo" template="edit" onClick="SysCodePage.updateCodeInfo" title="修改码值"/>
                <u:dropView name="removeCodeInfo" template="delete" onClick="SysCodePage.removeCodeInfo" title="删除码值"/>
            </u:dropListView>
            <u:dataSet id="codeInfoSet">
                <u:dataField name="id" visiable="false"/>
                <u:dataField name="codeType" visiable="false"/>
                <u:dataField display="码值编码" name="codeInfoValue"  width="90px"/>
                <u:dataField display="名称" name="codeInfoName" width="180px" align="left"/>
                <u:dataField display="序号" name="orderNumber" width="40px"/>
                <u:dataField display="状态" name="state" dropdown="drop_codeInfoState"/>
                <u:dataField name="oper" display="操作" dropView="dropView_codeInfoOper"/>
            </u:dataSet>
            <!-- 获取用户信息列表ajax -->
            <lui:ajax id="findCodeInfoAjax" url="${ctx }/sys/code/findCodeInfoByPage" formQuery="#findCodeInfoFrm" onSuccess="SysCodePage.onQueryCodeInfoSucc"/>
            <lui:ajax id="removeCodeInfoAjax" url="${ctx }/sys/code/removeCodeInfoById" type="post" onSuccess="SysCodePage.onRemoveCodeInfoSucc"/>
            <lui:datatable id="codeInfoDatatable" ajax="findCodeInfoAjax" pagination="codeInfoPagination" dataset="codeInfoSet" checkable="true"
                multiple="false" cutLine="true" />
            <lui:pagination datatable="codeInfoDatatable" id="codeInfoPagination" pageSize="15" pageChoice="15" showPageChoice="false"/>
        </form>
    </lui:board>
</lui:boards>
</body>
</u:View>
</html>